<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>OpenLayers v8.2.0 API - Module: ol/proj</title>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
    <link rel="stylesheet" type="text/css" href="styles/jaguar.css">
    <link rel="stylesheet" type="text/css" href="styles/carbon.css">
    <link rel="stylesheet" type="text/css" href="/theme/ol.css">
    <link rel="stylesheet" type="text/css" href="/theme/site.css">
</head>

<body>
    <header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70"
                alt="">&nbsp;OpenLayers</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu"
            aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
            <ul class="nav navbar-nav ms-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
                        <a class="dropdown-item" href="/doc/">Docs</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/doc/quickstart.html"><i
                                class="fa fa-check fa-fw me-2 fa-lg"></i>快速入门</a>
                        <a class="dropdown-item" href="/doc/faq.html"><i
                                class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
                        <a class="dropdown-item" href="/doc/tutorials/"><i
                                class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i
                                class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
                    </div>
                </li>
                <li class="nav-item"><a class="nav-link" href="/en/latest/examples/">Examples</a></li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="apidropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-sitemap me-1"></i>API
                    </a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="apidropdown">
                        <a class="dropdown-item" href="/en/latest/apidoc/"><i
                                class="fa fa-sitemap fa-fw me-2 fa-lg"></i>v8.2.0
                            (latest)</a </div>
                </li>
            </ul>
        </nav>
    </header>

    <div class="container-fluid">
        <div id="wrap" class="row">
            <div class="navigation col-md-4 col-lg-3">
                <div class="search-wrapper">
                    <div class="search">
                        <input id="search" type="text" autocomplete="off" class="form-control input-sm"
                            placeholder="Search Documentation">
                    </div>
                </div>
                <div class="navigation-list-wrapper">
                    <ul class="navigation-list search-empty">
                        <li class="item item-module toggle-manual toggle-manual-show" data-longname="module:ol/proj"
                            data-name="ol/proj">
                            <span class="title toggle">
                                <span class="fa fa-plus me-2 mt-1"></span>
                                <span><a href="module-ol_proj.html">ol​/proj</a></span>
                            </span>
                            <div class="member-list" data-type="typedefs">
                                <span class="subtitle">Typedefs</span>
                                <ul>
                                    <li data-name="projectionlike"><a
                                            href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a>
                                    <li data-name="transformfunction"><a
                                            href="module-ol_proj.html#~TransformFunction">TransformFunction</a>
                                </ul>
                            </div>
                            <div class="member-list" data-type="methods">
                                <span class="subtitle">Methods</span>
                                <ul>
                                    <li data-name="addcoordinatetransforms"><a
                                            href="module-ol_proj.html#.addCoordinateTransforms">addCoordinateTransforms</a>
                                    <li data-name="addequivalentprojections"><a
                                            href="module-ol_proj.html#.addEquivalentProjections">addEquivalentProjections</a>
                                    <li data-name="addprojection"><a
                                            href="module-ol_proj.html#.addProjection">addProjection</a>
                                    <li data-name="clearuserprojection"><a
                                            href="module-ol_proj.html#.clearUserProjection">clearUserProjection</a>
                                    <li data-name="equivalent"><a href="module-ol_proj.html#.equivalent">equivalent</a>
                                    <li data-name="fromlonlat"><a href="module-ol_proj.html#.fromLonLat">fromLonLat</a>
                                    <li data-name="get"><a href="module-ol_proj.html#.get">get</a>
                                    <li data-name="getpointresolution"><a
                                            href="module-ol_proj.html#.getPointResolution">getPointResolution</a>
                                    <li data-name="gettransform"><a
                                            href="module-ol_proj.html#.getTransform">getTransform</a>
                                    <li data-name="getuserprojection"><a
                                            href="module-ol_proj.html#.getUserProjection">getUserProjection</a>
                                    <li data-name="setuserprojection"><a
                                            href="module-ol_proj.html#.setUserProjection">setUserProjection</a>
                                    <li data-name="tolonlat"><a href="module-ol_proj.html#.toLonLat">toLonLat</a>
                                    <li data-name="transform"><a href="module-ol_proj.html#.transform">transform</a>
                                    <li data-name="transformextent"><a
                                            href="module-ol_proj.html#.transformExtent">transformExtent</a>
                                    <li data-name="usegeographic"><a
                                            href="module-ol_proj.html#.useGeographic">useGeographic</a>
                                </ul>
                            </div>
                        <li class="loading">Loading …
                    </ul>
                </div>
            </div>

            <div class="main col-md-8 col-lg-9">
                <h1 class="page-title" data-filename="module-ol_proj.html">Module: ol/proj</h1>
                <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
                    <button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert"
                        aria-label="Close"></button>
                    This documentation is for OpenLayers v<span id="package-version">8.2.0</span>. The <a
                        id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
                </div>




                <section class="content">

                    <header>
                        <h2 class="my-3">ol/proj
                        </h2>
                        <br>



                        <pre class="prettyprint source"><code>import * as olProj from 'ol/proj';</code></pre>


                        <!-- <div class="row p-3 ">
                        <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
                                <script async type="text/javascript"
                                    src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg"
                                    id="_carbonads_js"></script>
                            </div>
            </div> -->
                    </header>

                    <article>
                        <div class="container-overview">






                            <dl class="details">





















                            </dl>




                        </div>


















                        <h3 class="subsection-title">Functions</h3>

                        <dl>


                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".addCoordinateTransforms">
                                    </div>
                                    <h4 class="name">
                                        addCoordinateTransforms<span class="signature">(source, destination, forward,
                                            inverse)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L374">line
                                            374</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {addCoordinateTransforms} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>注册坐标转换函数，用于将源投影和目标投影之间的坐标进行转换。正向和逆向函数将坐标对进行转换；此函数将这些转换为内部使用的函数，这些函数还处理范围和坐标数组。
                                    </p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>source</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>投影源。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>destination</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>目标投影。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>forward</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">

                                                <p>正向转换函数（即从源投影到目标投影的转换）接受一个<a
                                                        href="module-ol_coordinate.html#~Coordinate"><code>Coordinate</code></a>作为参数，并返回转换后的<a
                                                        href="module-ol_coordinate.html#~Coordinate"><code>Coordinate</code></a>。

                                                </p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>inverse</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">

                                                <p>逆向转换函数（即从目标投影到源投影的转换）接受一个 <a
                                                        href="module-ol_coordinate.html#~Coordinate"><code>Coordinate</code></a>
                                                    作为参数，并返回转换后的<a
                                                        href="module-ol_coordinate.html#~Coordinate"><code>Coordinate</code></a>。如果转换函数只能转换输入坐标的较少维度，它应该返回一个只包含它能够转换的长度的坐标。其他维度将从源处保持不变。/p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".addEquivalentProjections">
                                    </div>
                                    <h4 class="name">
                                        addEquivalentProjections<span class="signature">(projections)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L260">line
                                            260</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {addEquivalentProjections} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>注册不改变坐标的转换函数。这些函数允许在具有相同意义的投影之间进行转换。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projections</code></td>



                                            <td class="type">


                                                <span class="param-type">Array&lt;<a
                                                        href="module-ol_proj_Projection-Projection.html">Projection</a>></span>




                                            </td>



                                            <td class="description last">

                                                <p>Projections.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".addProjection">
                                    </div>
                                    <h4 class="name">
                                        addProjection<span class="signature">(projection)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L151">line
                                            151</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {addProjection} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>将Projection对象添加到支持的投影列表中，可以通过它们的代码进行查找。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projection</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj_Projection-Projection.html">Projection</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>投影实例。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".clearUserProjection">
                                    </div>
                                    <h4 class="name">
                                        clearUserProjection<span class="signature">()</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L565">line
                                            565</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {clearUserProjection} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>如果设置了用户投影，则清除它。</p>
                                </div>











                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".equivalent">
                                    </div>
                                    <h4 class="name">
                                        equivalent<span class="signature">(projection1, projection2)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{boolean}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L439">line
                                            439</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {equivalent} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>检查两个投影是否相同，即一个投影中的每个坐标都表示与另一个投影中相同坐标的相同地理点。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projection1</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj_Projection-Projection.html">Projection</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Projection 1.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>projection2</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj_Projection-Projection.html">Projection</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Projection 2.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Equivalent.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".fromLonLat">
                                    </div>
                                    <h4 class="name">
                                        fromLonLat<span class="signature">(coordinate, <span
                                                class="optional">projection</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_coordinate.html#~Coordinate">Coordinate</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L398">line
                                            398</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {fromLonLat} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>将经纬度坐标转换为不同的投影。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>coordinate</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>经纬度坐标，即一个数组，其中经度作为第一个元素，纬度作为第二个元素。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>projection</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>目标投影。默认值为Web Mercator，即'EPSG:3857'。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                投影到目标投影的坐标。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".get">
                                    </div>
                                    <h4 class="name">
                                        get<span class="signature">(projectionLike)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_proj_Projection-Projection.html">Projection</a> |
                                            null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L172">line
                                            172</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {get} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>为指定的代码获取Projection对象。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projectionLike</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>要么是一个由权威和标识符组成的代码字符串，如"EPSG:4326"，要么是一个现有的投影对象，要么是undefined。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Projection object, or null if not in list.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".getPointResolution">
                                    </div>
                                    <h4 class="name">
                                        getPointResolution<span class="signature">(projection, resolution, point, <span
                                                class="optional">units</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L198">line
                                            198</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {getPointResolution} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>获取点在度或距离单位中的分辨率。对于以度为单位的投影，这只会返回提供的分辨率。对于其他投影，点的分辨率默认是通过将<code>point</code>像素转换为EPSG:4326，
                                        在正常球体上测量其宽度和高度，然后取宽度和高度的平均值来估计的。可以为特定投影提供自定义函数，通过在<a
                                            href="module-ol_proj_Projection-Projection.html"><code>Projection</code></a>
                                        构造函数中设置<code>getPointResolution</code>
                                        选项或使用 <a
                                            href="module-ol_proj_Projection-Projection.html#setGetPointResolution"><code>setGetPointResolution</code></a>来更改现有投影对象。
                                    </p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projection</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>The projection.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>resolution</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>投影单位中的名义分辨率。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>point</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>要查找调整后的分辨率的点。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>units</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj_Units.html#~Units">Units</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>获取点分辨率的单位。默认是投影的单位。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Point resolution.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".getTransform">
                                    </div>
                                    <h4 class="name">
                                        getTransform<span class="signature">(source, destination)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_proj.html#~TransformFunction">TransformFunction</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L483">line
                                            483</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {getTransform} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>给定类似投影的对象，搜索转换函数以将坐标数组从源投影转换为目标投影。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>source</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Source.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>destination</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Destination.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Transform function.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".getUserProjection">
                                    </div>
                                    <h4 class="name">
                                        getUserProjection<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_proj_Projection-Projection.html">Projection</a> |
                                            null}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L574">line
                                            574</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {getUserProjection} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>获取由API方法提供和返回的坐标的投影。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                The user projection (or null if not set).
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".setUserProjection">
                                    </div>
                                    <h4 class="name">
                                        setUserProjection<span class="signature">(projection)</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L557">line
                                            557</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {setUserProjection} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>为API方法提供和返回的坐标设置投影。这包括除与瓦片网格交互的API方法之外的所有API方法，以及<a
                                            href="module-ol_Map.html#~FrameState"><code>FrameState</code></a> and <a
                                            href="module-ol_View.html#~State"><code>State</code></a>.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>projection</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>The user projection.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".toLonLat">
                                    </div>
                                    <h4 class="name">
                                        toLonLat<span class="signature">(coordinate, <span
                                                class="optional">projection</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_coordinate.html#~Coordinate">Coordinate</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L416">line
                                            416</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {toLonLat} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>将坐标转换为经度/纬度。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>coordinate</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>投影坐标。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>projection</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>坐标的投影。默认值为Web Mercator，即'EPSG:3857'。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                经纬度坐标，即一个数组，其中经度作为第一个元素，纬度作为第二个元素。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".transform">
                                    </div>
                                    <h4 class="name">
                                        transform<span class="signature">(coordinate, source, destination)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_coordinate.html#~Coordinate">Coordinate</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L503">line
                                            503</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre class="prettyprint source"><code>import {transform} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>将坐标从源投影转换为目标投影。这将返回一个新的坐标（不会修改原始坐标）。</p>
                                    <p>有关范围转换，请参见 <a
                                            href="module-ol_proj.html#.transformExtent"><code>transformExtent</code></a>。有关几何变换，请参见<a
                                            href="module-ol_geom_Geometry-Geometry.html"><code>Geometry</code></a>及其子类的transform方法。
                                    </p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>coordinate</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Coordinate.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>source</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Source projection-like.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>destination</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Destination projection-like.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Coordinate.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".transformExtent">
                                    </div>
                                    <h4 class="name">
                                        transformExtent<span class="signature">(extent, source, destination, <span
                                                class="optional">stops</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_extent.html#~Extent">Extent</a>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L520">line
                                            520</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {transformExtent} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>将范围从源投影转换为目标投影。这将返回一个新的范围（不会修改原始范围）。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>extent</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_extent.html#~Extent">Extent</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>The extent to transform.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>source</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Source projection-like.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>destination</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_proj.html#~ProjectionLike">ProjectionLike</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Destination projection-like.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>stops</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>转换时每侧使用的停止点数。默认情况下只使用角落。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                The transformed extent.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id=".useGeographic">
                                    </div>
                                    <h4 class="name">
                                        useGeographic<span class="signature">()</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L584">line
                                            584</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">



                                <pre
                                    class="prettyprint source"><code>import {useGeographic} from 'ol/proj';</code></pre>



                                <div class="description">
                                    <p>在API方法中使用地理坐标（WGS-84基准面）。这包括除与瓦片网格交互的API方法之外的所有API方法，以及<a
                                            href="module-ol_Map.html#~FrameState"><code>FrameState</code></a> and <a
                                            href="module-ol_View.html#~State"><code>State</code></a>.</p>
                                </div>











                                <dl class="details">





















                                </dl>













                            </dd>

                        </dl>



                        <h3 class="subsection-title">Type Definitions</h3>

                        <dl>

                            <dt class="">
                                <div class="nameContainer">
                                    <div class="anchor" id="~ProjectionLike">
                                    </div>
                                    <h4 class="name">
                                        ProjectionLike<span
                                            class="type-signature type module:ol/proj/projection~projection">{<a
                                                href="module-ol_proj_Projection-Projection.html">Projection</a>}</span>
                                        <span class="type-signature type string">{string}</span> <span
                                            class="type-signature type undefined">{undefined}</span>


                                    </h4>
                                </div>

                            </dt>
                            <dd class="">

                                <div class="description">
                                    <p>投影作为 <a
                                            href="module-ol_proj_Projection-Projection.html"><code>Projection</code></a>,
                                        SRS标识符字符串或undefined。</p>
                                </div>



                                <dl class="details">





















                                </dl>



                            </dd>



                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="~TransformFunction">
                                    </div>
                                    <h4 class="name">
                                        TransformFunction<span class="signature">()</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js">proj.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/proj.js#L87">line
                                            87</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>转换函数接受一个输入坐标值的数组、一个可选的输出数组和一个可选的维度（默认应为2）。该函数转换输入坐标值，填充输出数组，并返回输出数组。</p>
                                </div>











                                <dl class="details">





















                                </dl>













                            </dd>

                        </dl>



                    </article>

                </section>




            </div>
        </div>
    </div>
    <script>prettyPrint();</script>
    <script src="scripts/linenumber.js"></script>
    <script src="scripts/main.js"></script>
</body>

</html>